home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15426 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: news.cern.ch!danpop
  2. From: danpop@mail.cern.ch (Dan Pop)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: A real basic problem: long integers or compiler problem?
  5. Date: 19 Apr 96 00:26:17 GMT
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <danpop.829873577@news.cern.ch>
  8. References: <4l3mom$f26@newsbf02.news.aol.com>
  9. NNTP-Posting-Host: ues5.cern.ch
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=US-ASCII
  12. Content-Transfer-Encoding: 7bit
  13. X-Newsreader: NN version 6.5.0 #18 (NOV)
  14.  
  15. In <4l3mom$f26@newsbf02.news.aol.com> theoder@aol.com (The Oder) writes:
  16.  
  17. >I'm in the process of relearning C and have been doing some beginning
  18. >programs on my PC.  I have two compilers (Borland C++ and Power C).  My
  19. >problem is that when I run a program using "long" integers (i.e. declare a
  20. >variable as "long"), it locks up immediately and I have to reboot.  This
  21. >has happened with both compilers and with two different really basic
  22. >programs (i.e. just trying to do a loop that will compute the first 10
  23. >powers of 2, and another one that simply just tries to find the largest
  24. >positive long value on my computer--> I can find the largest positive int
  25. >value, but when I convert it to long, it locks up)
  26. >
  27. >Is this a problem I have with BOTH (?!?!) compilers,
  28.  
  29. Obviously not.
  30.  
  31. >is it my computer
  32. >(486-DX2, 8 megs RAM) or settings,
  33.  
  34. Probably not.
  35.  
  36. >or is it just something I haven't
  37. >learned yet about long integers?  One of these programs I copied directly
  38. >from one of TWO books I'm using and it just locks up!
  39.  
  40. Post one of the programs (without omiting anything) and we'll tell you
  41. where is the problem.  Without seeing the code it is impossible to find
  42. the bug(s).
  43.  
  44. Dan
  45. --
  46. Dan Pop
  47. CERN, CN Division
  48. Email: danpop@mail.cern.ch 
  49. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  50.